package com.pojo;


import com.auto.annotation.AutoCode;
import com.auto.annotation.Column;
import com.auto.annotation.MyFunction;
import com.auto.annotation.Table;

import java.io.Serializable;

/**
 * EG
 * 预算项目字典
 *
 * @author
 */
@AutoCode(isOverride = false, includeSupperClass = false, showWay = "tree")
@Table(name = "PD_ITEMTYPE",jsname = "收支项目字典",includeSupperClass=false)
//@MyFunction(autoInitFromAccess = true,importData=true,treeSort=false)
public class ItemType extends TreeNodeBean implements Serializable {
	private static final long serialVersionUID = -922622834092981916L;

	@Column(flag="primary",treeId=true,autoGenneral=true)
	private String pid;

	@Column(jsname = "单位编号",jswidth = 150)
	private String companyid;

	@Column(treecolumn = true,jsname = "收支项目编号", jswidth = 150, jsAllowBlank = false, jsValidator = true, keyWordFilte = true)
	private String xmbh;
	@Column(jsname = "收支项目名称", jsAllowBlank = false, jswidth = 150, keyWordFilte = true)
	private String xmname;
	@Column(type="int",jsname = "等级")
	private int grade;
	@Column(jsname = "收支类型", render = "function(v){if(v=='1'){return '收入类型';}else {return '支出类型';}}",
			jsxtype = "radiogroup [items:[{"
					+ "inputValue: '1',"
					+ "boxLabel: '收入类型',"
					+ "anchor  : '30%',"
					+ "name  : 'protype',"
					+ "checked: true"
					+ "}, {"
					+ "inputValue: '2',"
					+ "anchor  : '30%',"
					+ "name  : 'protype',"
					+ "boxLabel: '支出类型'"
					+ "}]]")
	private int inouttype;
	/**
	 * 父节点
	 */
	@Column(treeparentId=true)
	private String parentid;
	/**
	 * 是否叶子节点
	 */
	@Column(treeleaf=true)
	private int isleaf;


	public String getParentid() {
		return parentid;
	}

	public void setParentid(String parentid) {
		this.parentid = parentid;
	}

	public int getIsleaf() {
		return isleaf;
	}

	public void setIsleaf(int isleaf) {
		this.isleaf = isleaf;
	}

	public String getCompanyid() {
		return companyid;
	}

	public void setCompanyid(String companyid) {
		this.companyid = companyid;
	}

	public String getXmbh() {
		return xmbh;
	}

	public void setXmbh(String xmbh) {
		this.xmbh = xmbh;
	}

	public String getXmname() {
		return xmname;
	}

	public void setXmname(String xmname) {
		this.xmname = xmname;
	}

	public int getGrade() {
		return grade;
	}

	public void setGrade(int grade) {
		this.grade = grade;
	}

	public int getInouttype() {
		return inouttype;
	}

	public void setInouttype(int inouttype) {
		this.inouttype = inouttype;
	}
}
